function* a(){
    while (1){
        yield 1
        yield 2
    }


}

var c=a();

// console.log(Array.from(c))

()=>
{
    for (const n of a()) {
        console.log(n);
    }
}


console.log(c.next());